#ifndef MESSAGEEDITAREA_H
#define MESSAGEEDITAREA_H

#include <QMap>
#include <QWidget>
#include <QPushButton>
#include <QVBoxLayout>
#include <QHBoxLayout>
#include <QPlainTextEdit>
#include <QScrollBar>

#include "historymessagewidget.h"

class MessageEditArea : public QWidget
{
    Q_OBJECT
public:
    explicit MessageEditArea(QWidget *parent = nullptr);

    void PushButtonsSlot();

public slots:
    void sendTextMessage();
    void sendImageMessage();
    void sendFileMessage();
    void soundRecordPressed();
    void soundRecordReleased();

    void addSelfMessage(model::MessageType messageType, const QByteArray &content, const QString& extraInfo);

    void addOtherMessage(const model::Message& msg);

private:
    QPushButton* m_sendImageBtn = nullptr;
    QPushButton* m_sendSpeechBtn = nullptr;
    QPushButton* m_sendFileBtn = nullptr;
    QPushButton* m_showHistoryBtn = nullptr;
    QPlainTextEdit* m_textEdit = nullptr;
    QPushButton* m_sendBtn = nullptr;
    QLabel* m_tipLabel = nullptr;

signals:
};

#endif // MESSAGEEDITAREA_H
